#pragma once

class Tool : public CCmdTarget
{
#if _MFC_VER < 0x0700 
	//fedor: this line existed in PM1 and due to unknown reason disappeared later,
	//but without it VC6 reports error: class "Tool" has no member "classTool"
	DECLARE_DYNAMIC(Tool)
#endif
public:
	/* Deprecated! */
	virtual void Activate() 
		{ }
	/* Deprecated! */
	virtual void Deactivate() 
		{ }
	/* Deprecated! */
	virtual void Show()
		{ }
	/* Deprecated! */
	virtual void Hide()
		{ }
	virtual void OnActivateView()
		{ }
	virtual void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
		{ }
	virtual void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) 
		{ }
	virtual void OnLButtonDblClk(UINT nFlags, CPoint p) 
		{ }
	virtual void OnLButtonDown(UINT nFlags, CPoint p)
		{ }
	virtual void OnLButtonUp(UINT nFlags, CPoint p)
		{ }
	virtual void OnMouseMove(UINT nFlags, CPoint p)
		{ }
	virtual void OnMouseEnter(UINT nFlags, CPoint p)
		{ }
	virtual void OnMouseLeave()
		{ }
	virtual void OnRButtonDblClk(UINT nFlags, CPoint p) 
		{ }
	virtual void OnRButtonDown(UINT nFlags, CPoint p)
		{ }
	virtual void OnRButtonUp(UINT nFlags, CPoint p)
		{ }
	virtual bool OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
		{ return false; }
	virtual void OnResize(UINT nType, int cx, int cy)
		{ }
	virtual void OnSetFocus()
		{ }
	virtual void OnKillFocus()		
		{ }		  
	virtual void PaintRect(CDC * pDC, const CRect & r)
		{ }
	DECLARE_MESSAGE_MAP()
};

class Manipulator {
public:
	virtual ~Manipulator() { }
public:
	virtual void Manipulate(UINT nFlags, CPoint p) = 0;
	virtual void Apply(UINT nFlags, CPoint p) = 0;
	virtual void PaintRect(CDC *, const CRect &) = 0;
	virtual bool OnSetCursor(CPoint p) 
		{ return false; }
};

